package com.probox.common.entity.domain.product.vo;

import cn.hutool.core.util.ObjectUtil;
import com.probox.common.core.utils.StringUtils;
import com.probox.common.core.utils.money.MoneyUtils;
import com.probox.common.core.utils.money.PriceFormatUtil;

import java.math.BigDecimal;

/**
 *  修改库存和价格的vo
 */
public class ProductEditVo {
    private Long productUid;
    private Long skuUid;
    private String productName;
    private String valuesDesc;
    private Long stockNumber;
    private Integer costPrice;
    private BigDecimal retailPrice;
    private BigDecimal tradePrice;
    private BigDecimal skuCostPrice;
    private BigDecimal skuRetailPrice;
    private BigDecimal skuTradePrice;
    private BigDecimal showPrice;
    private String carouselImg;
    private String imgCoverUrl;
    private Long skuStockNumber;
    private String costPriceStr;
    private String retailPriceStr;
    private String trdePriceStr;
    private String showPriceStr;
    private String skuCostPriceStr;
    private String skuReatilPriceStr;
    private String skuTrdePriceStr;
    private String type;
    public String getCarouselImgOne() {
        if(!StringUtils.isEmpty(carouselImg)){
            String[] split = carouselImg.split(",");
            return split[0];
        }
        return "";
    }

    public String getShowPriceStr() {
        if(ObjectUtil.isNotEmpty(showPrice)){
            return MoneyUtils.changeF2B(showPrice);
        }
        return "0.0";
    }

    public String getCostPriceStr() {
        return costPrice.toString();
    }
    public String getRetailPriceStr() {
        return MoneyUtils.changeF2B(retailPrice);
    }
    public String getTradePriceStr() {
        return MoneyUtils.changeF2B(tradePrice);
    }

    public String getSkuCostPriceStr() {
        if(ObjectUtil.isNotEmpty(skuCostPrice)){
            return MoneyUtils.changeF2B(skuCostPrice);
        }
        return "0.0";
    }
    public String getSkuRetailPriceStr() {
        if(ObjectUtil.isNotEmpty(skuRetailPrice)) {
            return MoneyUtils.changeF2B(skuRetailPrice);
        }
        return "0.0";
    }
    public String getSkuTradePriceStr() {
        if(ObjectUtil.isNotEmpty(skuTradePrice)) {
            return MoneyUtils.changeF2B(skuTradePrice);
        }
        return "0.0";
    }

    public Long getProductUid() {
        return productUid;
    }

    public void setProductUid(Long productUid) {
        this.productUid = productUid;
    }

    public Long getSkuUid() {
        return skuUid;
    }

    public void setSkuUid(Long skuUid) {
        this.skuUid = skuUid;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getValuesDesc() {
        return valuesDesc;
    }

    public void setValuesDesc(String valuesDesc) {
        this.valuesDesc = valuesDesc;
    }

    public Long getStockNumber() {
        return stockNumber;
    }

    public void setStockNumber(Long stockNumber) {
        this.stockNumber = stockNumber;
    }

    public Integer getCostPrice() {
        return costPrice;
    }

    public void setCostPrice(Integer costPrice) {
        this.costPrice = costPrice;
    }

    public BigDecimal getRetailPrice() {
        return retailPrice;
    }

    public void setRetailPrice(BigDecimal retailPrice) {
        this.retailPrice = retailPrice;
    }

    public BigDecimal getTradePrice() {
        return tradePrice;
    }

    public void setTradePrice(BigDecimal tradePrice) {
        this.tradePrice = tradePrice;
    }

    public BigDecimal getSkuCostPrice() {
        return skuCostPrice;
    }

    public void setSkuCostPrice(BigDecimal skuCostPrice) {
        this.skuCostPrice = skuCostPrice;
    }

    public BigDecimal getSkuRetailPrice() {
        return skuRetailPrice;
    }

    public void setSkuRetailPrice(BigDecimal skuRetailPrice) {
        this.skuRetailPrice = skuRetailPrice;
    }

    public BigDecimal getSkuTradePrice() {
        return skuTradePrice;
    }

    public void setSkuTradePrice(BigDecimal skuTradePrice) {
        this.skuTradePrice = skuTradePrice;
    }

    public Long getSkuStockNumber() {
        return skuStockNumber;
    }

    public void setSkuStockNumber(Long skuStockNumber) {
        this.skuStockNumber = skuStockNumber;
    }

    public String getCarouselImg() {
        return carouselImg;
    }

    public void setCarouselImg(String carouselImg) {
        this.carouselImg = carouselImg;
    }

    public String getImgCoverUrl() {
        return imgCoverUrl;
    }

    public void setImgCoverUrl(String imgCoverUrl) {
        this.imgCoverUrl = imgCoverUrl;
    }


    public BigDecimal getShowPrice() {
        return showPrice;
    }

    public void setShowPrice(BigDecimal showPrice) {
        this.showPrice = showPrice;
    }


    public void setCostPriceStr(String costPriceStr) {
        this.costPriceStr = costPriceStr;
    }

    public void setRetailPriceStr(String retailPriceStr) {
        this.retailPriceStr = retailPriceStr;
    }

    public void setTrdePriceStr(String trdePriceStr) {
        this.trdePriceStr = trdePriceStr;
    }

    public void setShowPriceStr(String showPriceStr) {
        this.showPriceStr = showPriceStr;
    }

    public void setSkuCostPriceStr(String skuCostPriceStr) {
        this.skuCostPriceStr = skuCostPriceStr;
    }

    public void setSkuReatilPriceStr(String skuReatilPriceStr) {
        this.skuReatilPriceStr = skuReatilPriceStr;
    }

    public void setSkuTrdePriceStr(String skuTrdePriceStr) {
        this.skuTrdePriceStr = skuTrdePriceStr;
    }
}
